<?php
    class Application_Form_AcademicDegree extends Validation_Form
{

  public function init()
  {
    $this->setName("zendForm");
    $this->setMethod('post');
	$id = new Zend_Form_Element_Hidden('id');
	$id->addFilter('Int');
    $academicDegree = $this->createElement('text', 'designation');
    $typeForm = $this->createElement('hidden','typeForm');
    $academicDegree->setLabel('Stopień naukowy')
         ->setRequired(TRUE)
         ->setAttrib('size', 30)
         ->addFilters(array(
            new Zend_Filter_StringTrim(),
            new Zend_Filter_StripNewlines(),
			new Zend_Filter_StripTags()
           ))
         ->addValidators(array(
            new Zend_Validate_NotEmpty(),
            new Zend_Validate_StringLength(array('min' => 2, 'max' => 30)),
            new Zend_Validate_Alpha()
            ));
    $submit = new Zend_Form_Element_Submit('submit');
	$submit->setAttrib('id', 'submit');
    
    $this->addElements(array(
    	$id,
    	$academicDegree,
    	$typeForm,
        $submit,
        ));
  }

	
}
?>